<template>
    <div class="load_item" id="dcdLoad">
      <div>
        <p>代采贷</p>
        <div class="link_btn" @click="handleLink()">去查看</div>
      </div>
      <img src="../../assets/img/load.png"/>
    </div>
</template>
<script setup>
import {getUrl} from "@/server/common/otherSys.js"
import { ElLoading } from 'element-plus'
import { onMounted, ref } from "vue"
let url = ''
const init = () => {
  const loadingInstance = ElLoading.service()
  getUrl().then(res => {
    url = res.fromUrl
    loadingInstance.close()
  }).catch(msg => {
    loadingInstance.close()
  })
}
// 跳转
const handleLink = () => {
  if(url) window.open(url, '_banke')
}
onMounted(() => {
  init()
})
</script>
<style scoped>
.load_item{
  box-shadow: 0 0 15px #dad8da;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 10px;
  background: linear-gradient(45deg, #ca38d7, #487be0);
  color: var(--el-color-info-light-9);
}
.load_item img{
  width: 140px;
}
.link_btn{
  border: solid 1px var(--el-color-info-light-9);
  border-radius: 20px;
  padding: 2px 20px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .3s;
}
.link_btn:hover{
  background: #5f23643b;
}
</style>